package offer;

public class numWays_10 {
    public int numWays(int n) {
        if(n == 0) return 0;
        if(n == 1) return 1;
        if(n == 2) return 2;
        int pre1 = 1;
        int pre2 = 2;
        int result = 0;
        for (int i = 3; i < n; i++) {
            result = (pre1 + pre2)%1000000007;
            pre1 = pre2;
            pre2 = result;
        }
        return result;

    }
}
